/*
 * @Descripttion: 
 * @version: 
 * @Author: Jinjin
 * @Date: 2022-04-28 10:01:03
 * @LastEditors: Jinjin
 * @LastEditTime: 2022-05-22 15:48:40
 */
//index文件
const Router = require('koa-router')
const router=new Router()
const video = require('./video')
const thumb=require('./thumb')
const comment = require("./comment")
const collect=require('./collect')
const cognizes=require('./cognize')
const residential=require('./residential')
const customer=require('./customer')

router.get('/', async (ctx) => {
    ctx.body='首页'
})

//router.use()调用中间件
router.use('/video', video.routes(), video.allowedMethods())
router.use('/thumb', thumb.routes(), thumb.allowedMethods())
router.use('/comment', comment.routes(), comment.allowedMethods())
router.use('/collect',collect.routes(),collect.allowedMethods())
router.use('/cognizes',cognizes.routes(),cognizes.allowedMethods())
router.use('/customer',customer.routes(),customer.allowedMethods())
router.use('/residential',residential.routes(),residential.allowedMethods())

module.exports = router
